package com.xiaohong.order.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.Date;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "OrderItem")
public class OrderItem implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "ID",accessMode = READ_ONLY)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
	private String id;//ID

    @Schema(description = "用户id")
    @TableField("userId")
	private String userId;//用户id

    @Schema(description = "1级分类")
    @TableField("category_id1")
	private Integer categoryId1;//1级分类

    @Schema(description = "2级分类")
    @TableField("category_id2")
	private Integer categoryId2;//2级分类

    @Schema(description = "3级分类")
    @TableField("category_id3")
	private Integer categoryId3;//3级分类

    @Schema(description = "SPU_ID")
    @TableField("spu_id")
	private String spuId;//SPU_ID

    @Schema(description = "SKU_ID")
    @TableField("sku_id")
	private String skuId;//SKU_ID

    @Schema(description = "订单ID")
    @TableField("order_id")
	private String orderId;//订单ID

    @Schema(description = "商品名称")
    @TableField("name")
	private String name;//商品名称

    @Schema(description = "单价")
    @TableField("price")
	private Float price;//单价

    @Schema(description = "数量")
    @TableField("num")
	private Integer num;//数量

    @Schema(description = "总金额")
    @TableField("money")
	private Float money;//总金额

    @Schema(description = "实付金额")
    @TableField("pay_money")
	private Float payMoney;//实付金额

    @Schema(description = "图片地址")
    @TableField("image")
	private String image;//图片地址

    @Schema(description = "运费")
    @TableField("post_fee")
	private Float postFee;//运费

    @Schema(description = "支付状态：0:待付款 1：已付款 2：付款失败 3：已退款 4：退款失败 5：交易结束（不可退款）")
    @TableField("status")
	private Integer status;//订单状态：0:待付款 1：已付款 2：付款失败 3：已退款 4：退款失败

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private Date gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁



	//get方法
	public String getId() {
		return id;
	}

	//set方法
	public void setId(String id) {
		this.id = id;
	}
	//get方法
	public String getUserId() {
		return userId;
	}

	//set方法
	public void setUserId(String userId) {
		this.userId = userId;
	}
	//get方法
	public Integer getCategoryId1() {
		return categoryId1;
	}

	//set方法
	public void setCategoryId1(Integer categoryId1) {
		this.categoryId1 = categoryId1;
	}
	//get方法
	public Integer getCategoryId2() {
		return categoryId2;
	}

	//set方法
	public void setCategoryId2(Integer categoryId2) {
		this.categoryId2 = categoryId2;
	}
	//get方法
	public Integer getCategoryId3() {
		return categoryId3;
	}

	//set方法
	public void setCategoryId3(Integer categoryId3) {
		this.categoryId3 = categoryId3;
	}
	//get方法
	public String getSpuId() {
		return spuId;
	}

	//set方法
	public void setSpuId(String spuId) {
		this.spuId = spuId;
	}
	//get方法
	public String getSkuId() {
		return skuId;
	}

	//set方法
	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}
	//get方法
	public String getOrderId() {
		return orderId;
	}

	//set方法
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	//get方法
	public String getName() {
		return name;
	}

	//set方法
	public void setName(String name) {
		this.name = name;
	}
	//get方法
	public Float getPrice() {
		return price;
	}

	//set方法
	public void setPrice(Float price) {
		this.price = price;
	}
	//get方法
	public Integer getNum() {
		return num;
	}

	//set方法
	public void setNum(Integer num) {
		this.num = num;
	}
	//get方法
	public Float getMoney() {
		return money;
	}

	//set方法
	public void setMoney(Float money) {
		this.money = money;
	}
	//get方法
	public Float getPayMoney() {
		return payMoney;
	}

	//set方法
	public void setPayMoney(Float payMoney) {
		this.payMoney = payMoney;
	}
	//get方法
	public String getImage() {
		return image;
	}

	//set方法
	public void setImage(String image) {
		this.image = image;
	}
	//get方法
	public Float getPostFee() {
		return postFee;
	}

	//set方法
	public void setPostFee(Float postFee) {
		this.postFee = postFee;
	}
	//get方法
	public Integer getStatus() {
		return status;
	}

	//set方法
	public void setStatus(Integer status) {
		this.status = status;
	}
	//get方法
	public Integer getDeleted() {
		return deleted;
	}

	//set方法
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	//get方法
	public Date getGmtCreate() {
		return gmtCreate;
	}

	//set方法
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	//get方法
	public Date getGmtModified() {
		return gmtModified;
	}

	//set方法
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	//get方法
	public Integer getVersion() {
		return version;
	}

	//set方法
	public void setVersion(Integer version) {
		this.version = version;
	}


}
